using System;
using System.Collections.Generic;
using System.Text;
using IGlobalist.Cms.Model;

namespace IGlobalist.Cms.Presentation
{
    public class TemplateEngineFactory
    {
        public static ITemplateEngine GetTemplateEngine(ITemplate template)
        {
            //return new NVelocityTemplateEngine(template);
            //return new AderTemplateEngine(template);
            switch (template.Type)
            {
                case TemplateType.Ader:
                    return new AderTemplateEngine(template);
                    break;
                case TemplateType.NVelocity:
                    return new NVelocityTemplateEngine(template);
                    break;
                case TemplateType.Aspx:
                    return new AspxTemplateEngine(template);
                    break;
                case TemplateType.Xslt:
                    return new XsltTemplateEngine(template);
                    break;
                default:
                    return null;
            }
        }
    }
}
